import React, { useEffect } from 'react'
import { getHomeDetailOrder } from '@/api/request'
import { useState } from 'react'
import HomeDetailBanners from '@/components/HomeDetailBanners'
import SaleDetail from '@/components/SaleDetail'

export default function HomeOrder() {
  const [banners, setBanners] = useState([])
  const [detail, setDetail] = useState([])

    useEffect(() => {
        (async () => {
          let { data } = await getHomeDetailOrder();
          setBanners(data)
          setDetail(data)
        })()
    }, [])

    return (
      <>
          <HomeDetailBanners banners={banners} />
          <SaleDetail detail={detail}/>
      </>
    )
}
